package com.cf.base.leak.observe;

import android.app.Activity;

import java.lang.reflect.Method;

/**
 * @author yangji
 */
class InvokeLeakFragment {
    private Object fragment;

    private Method method;

    InvokeLeakFragment(Object fragment, Method method) {
        this.fragment = fragment;
        this.method = method;
    }

    void invoke(Activity activity) {
        try {
            method.invoke(fragment, activity);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
